/** 下拉列表 */
var selector = {
  implTypes: [
    { value: 1, name: '硬编码' },
    { value: 2, name: '规则配置' }
  ],
  secondChecks: [
    { value: 1, name: '启用' },
    { value: 0, name: '禁用' }
  ],
  ruleStatuses: [
    { value: 1, name: '待确认' },
    { value: 2, name: '确认未实现' },
    { value: 3, name: '确认已实现' }
  ],
  logOperators: [
    { value: 1, name: '新增' },
    { value: 2, name: '修改' },
    { value: 3, name: '删除' }
  ]
}

// 获取下拉框
export function getSelector() {
  return selector
}

// 返回空规则定义
export function emptyRuleDefinition() {
  var effectiveDate = new Date()
  effectiveDate.setDate(effectiveDate.getDate() + 1)
  var expirationDate = new Date('2049-12-30')
  return {
    id: null,
    columnIndex: null,
    columnName: null,
    ruleDesc: null,
    businessTypeIds: [],
    effectiveDate: effectiveDate,
    expirationDate: expirationDate,
    sheetVariableName: null,
    sheetId: null,
    secondCheck: null,
    remark: null,
    implType: null,
    ruleStatus: null,
    revision: null,
    createdBy: null,
    createdTime: null,
    updatedBy: null,
    updatedTime: null
  }
}
